/**
 * 
 */
package com.geezdata.cps.admin.task.job;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

import com.geezdata.cps.cqrs.command.Command;
import com.geezdata.cps.cqrs.command.bus.CommandBus;
import com.geezdata.cps.ttk.common.request.CreateOrUpdateOrderSyncTaskRequest;

/**
 * @author sszheng
 * @date 创建时间：2018年11月1日 下午2:36:50
 *
 */
public class CreateOrderSyncTaskJob implements Job {
	@Autowired
	private CommandBus commandBus;
	@Autowired
	private Command<CreateOrUpdateOrderSyncTaskRequest, Object> createOrUpdateOrderSyncTaskCommand;

	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		CreateOrUpdateOrderSyncTaskRequest request = new CreateOrUpdateOrderSyncTaskRequest();
		commandBus.dispatch(createOrUpdateOrderSyncTaskCommand, request);
	}

}
